package com.supervision.manage.controller

import com.fly.base.common.DataResponse
import com.supervision.manage.service.IndexService
import io.swagger.annotations.Api
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestMethod
import org.springframework.web.bind.annotation.RestController

/**
 *  Created by whis on 2019-06-16
 */
@RestController
@RequestMapping("manage/1/dashboard")
@Api(tags = ["后台主页"])
class DashboardController {

    @Autowired
    lateinit var indexService: IndexService

    @RequestMapping("index", method = [(RequestMethod.GET)])
    fun index(): DataResponse {
        val data = indexService.dashboardIndex()
        return DataResponse.create().putAll(data)
    }
}